import request from '@/pages/utils/request.js'
export const userRegisterService = (registerData) => {
    // const params = new URLSearchParams()
    // for (let key in registerData) {
    //     params.append(key, registerData[key])
    // }
    return request.post('/user/register', registerData,{headers:{"Content-Type":"application/json"}})
}
export const userForgetService = (registerData) => {
    // const params = new URLSearchParams()
    // for (let key in registerData) {
    //     params.append(key, registerData[key])
    // }
    return request.post('/user/forgetPassword', registerData,{headers:{"Content-Type":"application/json"}})
}
export const userLoginService = (loginData) => {
    const params = new URLSearchParams()
    for (let key in loginData) {
        params.append(key, loginData[key])
    }
    return request.post('/user/login', params)
}

export const userInfoService = ()=>{
    return request.get('/user/userInfo')
}